<?php 
	session_start();
	error_reporting(0);
	include "CONFIG.config";
	include "DB.config";
	$clsDBConn = new DBConn();
	require (LIB . "common/common.class.php");
	require (LIB . "common/db.class.php");
	CommonFunc::loadFile("model/Category.php");
	CommonFunc::loadFile('model/Gallery.php');		
	CommonFunc::loadFile(ADAPTOR . "Savecart.php");	
	CommonFunc::loadFile(ADAPTOR . "MiddleLink.php");	
	
	$modCat = new FrontCategory();
	$modGallery = new FrontGallery();
	$modSaveCart = new SaveCartHelper();
	$clsMiddleLink = new MiddleLink();
	//$clsPaginator = new Paginator();
	$cat_menu_arr = $modCat->getCategoryMenu();
	$subcat_menu_arr = $modCat->getSubCatMenu();
	$cat_arr = $modCat->getCategories();
	$gallery_arr = $modGallery->getGalleryImages();
        $prombanner_arr=$modGallery->getPromoImages();
        
	$module_arr = $_SERVER['QUERY_STRING']; 
	$module_arr = explode("/", $module_arr);
	$module = $module_arr[0];
	$param1 = $module_arr[1];
	$param2 = $module_arr[2];
	$param3 = $module_arr[3];
	$param4 = $module_arr[4];
        if($param1=="subcat" || $param1=="cat"){
           $features_arr=array();
           $features_arr = $modCat->getPowesearchfeatures($param1,$param2);
        }
	//print_r($features);exit;
	if($module == "logout")
	{
		unset($_SESSION['user_id']);
		unset($_SESSION['user_name']);
		unset($_SESSION['user_firstname']);
		unset($_SESSION['user_lastname']);
	}
	
	include(SITETPL . "index.phtml");
?>